/*
 * Direct3D.h
 *
 *  Created on: May 28, 2011
 *      Author: Ernest Mashele <mashern@gmail.com>
 */

#ifndef DIRECT3D_H_
#define DIRECT3D_H_

#include "Helper.h"

class Direct3D
{
public:
	Direct3D();
	virtual ~Direct3D();

	bool Initialize(HWND hWnd);
	void Shutdown();

	void BeginScene();
	void EndScene();

	ID3D10Device* GetDevice();

	void GetProjectionMatrix(D3DXMATRIX&);
	void GetWorldMatrix(D3DXMATRIX&);
	void GetOrthoMatrix(D3DXMATRIX&);

private:
	ID3D10Device* pDevice;
	IDXGISwapChain* pSwapChain;
	ID3D10RenderTargetView* pRenderTargetView;
	ID3D10Texture2D* pDepthStencil;
	ID3D10DepthStencilView* pDepthStencilView;
	ID3D10RasterizerState* pSolidState;
	D3DXMATRIX Projection;
	D3DXMATRIX World;
	D3DXMATRIX Orthographic;
};

#endif /* DIRECT3D_H_ */
